<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>解决IE8不支持last-child的问题</title>
        <style>
        .list li:first-child{
            color:#0f0;
        }
        .list li:last-child,.list li.last{
            color:#f00;
        }
        </style>
    </head>
    <body>
        <ul class="list">
            <li>怎么挣钱？</li>
            <li>怎么挣钱？</li>
            <li>怎么挣钱？</li>
            <li>怎么挣钱？</li>
        </ul>
        <ul class="list">
            <li>怎么挣钱？</li>
            <li>怎么挣钱？</li>
            <li>怎么挣钱？</li>
            <li class="last">怎么挣钱？</li>
        </ul>
    </body>
</html>